home *** CD-ROM | disk | FTP | other *** search
/ Celestin Apprentice 4 / Apprentice-Release4.iso / Source Code / Think Class Libraries / WASTE TCL 1.8 / WASTE TCL 1.8 ƒ / CTSMDesktop.cpp next >
Encoding:
C/C++ Source or Header  |  1995-11-12  |  939 b   |  38 lines  |  [TEXT/SPM ]

  1. /******************************************************************************\
  2.  CTSMDesktop.cpp
  3.  
  4.     Desktop that sets the cursor for TSM
  5.  
  6.     by Dan Crevier
  7.     version 1.8
  8.  
  9.     SCG        95/09/22    simplified a bit, added RTTI macro 
  10.     Roms    95/11/08    adapted to THINK C / TCL 1.1.3
  11. \ ******************************************************************************/
  12.  
  13. #include "CTSMDesktop.h"
  14. #include <TextServices.h>
  15.  
  16. #if TCL_VERSION >= 0x02000000
  17. TCL_DEFINE_CLASS_M1(CTSMDesktop, CDesktop);
  18. #endif
  19.  
  20. // •• Global Variables ••
  21.     
  22. extern short         gUsingTSM;            // Using Text Service Manager?
  23.  
  24. void CTSMDesktop::DispatchCursor(Point where, RgnHandle mouseRgn)
  25. {
  26.     Boolean tsmSetCursor = false;
  27.     
  28.     // if we are using TSM, let TSM have chance at setting cursor
  29.     if (gUsingTSM)
  30.     {
  31.         tsmSetCursor = SetTSMCursor(where);
  32.     }
  33.     
  34.     // if it didn't set it, let normal CDesktop handle it the normal way
  35.     if (!tsmSetCursor)
  36.         CDesktop::DispatchCursor(where, mouseRgn);
  37. }
  38.